from math import sqrt
def getnum():
    nums = []
    inumstr = input('请输入数字(直接输入回车退出)：')
    while inumstr != '':
        nums.append(eval(inumstr))
        inumstr = input('请输入数字(直接输入回车退出)：')
    return nums
def mean(numbers):
    s = 0.0
    for num in numbers :
        s = s + num
    return s / len(numbers)
def dev(numbers,mean):
    sdev  = 0.0
    for num in numbers:
        sdev = sdev + (num - mean)**2
    return sqrt(sdev / (len(numbers)-1))
def median(numbers):
    new = sorted(numbers) 
    size = len(numbers)
    if size % 2 == 0 :
        med = (new[size//2-1] + new[size//2])/2
    else:
        med = new[size//2]
    return med
n = getnum()
m = mean(n)
print('平均值：{},标准差:{:.2},中位数:{}.'.format(m,dev(n,m),median(n)))
